package team18.yuejian;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

public abstract class RetrofitCallback<T> implements Callback {
    abstract public void onResponse(T t);
    public  void onResponse(Call call, Response response){
        onResponse((T)response.body());
    }
    public void onFailure(Call call, Throwable t){
        System.err.println(t.getLocalizedMessage());
    }
}
